from rest_framework import serializers


class UploadEventAO(serializers.Serializer):
    # 上报内容
    report_text = serializers.CharField()

    # 环境
    env = serializers.CharField()

    # 匹配模式
    match_mode = serializers.CharField()

    # 是否需要签名
    is_sign = serializers.CharField()

    # 设备SN
    sn = serializers.CharField()

    # 设备密钥
    secret = serializers.CharField()

    # 上报时间间隔
    up_time = serializers.IntegerField()

    def all(self):
        return ['report_text', 'env', 'match_mode', 'is_sign', 'sn', 'secret', 'up_time']
